package com.library.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 审核状态枚举
 *
 * @author: xyh
 * @create: 2023-06-01
 **/

@Getter
@AllArgsConstructor
public enum AuditStatusEnum {

    REVIEWING(0, "审核中"),
    AUDIT_SUCCESS(1, "审核通过"),
    REJECT(2, "审核不通过"),
    TIME_SEND(3, "定时发布"),
    CANCEL_TIME(4, "取消定时"),
    SEND_SUCCESS(5, "发布成功"),
    SEND_FAIL(6, "发布失败");

    private Integer code;
    private String desc;


    public static String getValue(Integer code) {
        AuditStatusEnum[] statusEnums = values();
        for (AuditStatusEnum statusEnum : statusEnums) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum.getDesc();
            }
        }
        return null;
    }

}
